
package guice.boot.archive.container.pipeline;

import guice.boot.archive.exception.ArkRuntimeException;
import guice.boot.archive.spi.pipeline.PipelineContext;
import guice.boot.archive.spi.pipeline.PipelineStage;
import guice.boot.archive.spi.service.extension.ArkServiceLoader;
import guice.boot.archive.spi.service.extension.ExtensionLoaderService;

import javax.inject.Inject;
import javax.inject.Singleton;


@Singleton
public class ExtensionLoaderStage implements PipelineStage {

    @Inject
    private ExtensionLoaderService extensionLoaderService;

    @Override
    public void process(PipelineContext pipelineContext) throws ArkRuntimeException {
        ArkServiceLoader.setExtensionLoaderService(extensionLoaderService);
    }
}